<template>
  <div class="newwest">
    <NewestItem v-for="item in listArr" :key="item.id" :itemObj="item"></NewestItem>
  </div>
</template>
<script>
import NewestItem from '@/components/NewestItem.vue'
import { newAxios } from '@/network/indexAxios.js'
export default {
  components: {
    NewestItem
  },
  data () {
    return {
      listArr: []
    }
  },
  mounted () {
    this.getNsData()
  },
  methods: {
    getNsData () {
      newAxios().then(res => {
        console.log(res.data)
        this.listArr = res.data
      })
    }
  }
}
</script>

<style lang="less" scoped>
.newwest{
  background-color: #f6f6f6;
  padding:0.3rem 0.2rem;
  margin-top:0.3rem;
  // 多列布局
  column-count: 2;
  column-gap: .2rem;

}
</style>
